const path = require('path')

const PUBLIC_PATH = process.env.VUE_APP_ENV ? process.env.VUE_APP_URL : '/'

const resolve = (dir) => {
  return path.join(__dirname, dir)
}

module.exports = {
  publicPath: PUBLIC_PATH,
  lintOnSave: false,
  chainWebpack: (config) => {
    // 一些 alias 配置
    config.resolve.alias
      .set('@', resolve('src'))
      .set('_c', resolve('src/components'))
  },
  productionSourceMap: false, // 打包时是否生成 map 文件
}
